package com.smart.service;

import com.smart.dao.LessonDao;
import com.smart.domain.Lesson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class LessonServiceImp implements LessonService {


    public void setLessonDao(LessonDao lessonDao) {
        this.lessonDao = lessonDao;
    }

    @Autowired
    LessonDao lessonDao;

    public int  add( Lesson lesson){  //添加课程
        return lessonDao.add(lesson);
    }
    public int deletelesson(Lesson lesson){   //根据课程名删除课程
        return lessonDao.deletelesson(lesson);
    }
    public int updatelesson(Lesson lesson){  //根据课程名修改课程
        return lessonDao.updatelesson(lesson);
    }
    public void querylesson(Lesson lesson){  //根据课程名查看课程信息
        lessonDao.querylesson(lesson);
    }
    public Lesson querylistLesson(){    // 查看全部课程信息
        return lessonDao.querylistLesson();
    }

}
